//
//  BaseImageView.m
//  UIImageView
//
//  Created by WangZe on 15/11/25.
//  Copyright © 2015年 王泽龙. All rights reserved.
//

#import "BaseImageView.h"

@implementation BaseImageView

// 相当于重写了UIImageView
- (instancetype)init
{
    self = [super init];
    if (self) {
        // 添加点击手势
        [self addGesture];
    }
    return self;
}
- (void)addGesture
{
    // 创建点击手势
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickImageView:)];
    self.userInteractionEnabled = YES;
    [self addGestureRecognizer:tapGesture];
    
   
}

- (void)clickImageView:(UITapGestureRecognizer *)gesture
{
    // 协议方法用来push下一页
    [self.delegeta pushNextViewController:self.tag];
   
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
